import { request } from '@/utils'

export default {
  create: data => request.post('/dataCenter/dictType/create', data),
  read: (params = {}) => request.get('/dataCenter/dictType/index', { params }),
  update: data => request.put(`/dataCenter/dictType/update/${data.id}`, data),
  delete: ids => request.delete(`/dataCenter/dictType/delete/${ids}`),
  updateStatus: data => request.post(`/dataCenter/dictType/updateStatus/${data.id}`, data),

  createDictData: data => request.post('/dataCenter/dictData/create', data),
  readDictData: (params = {}) => request.get('/dataCenter/dictData/index', { params }),
  updateDictData: data => request.put(`/dataCenter/dictData/update/${data.id}`, data),
  deleteDictData: ids => request.delete(`/dataCenter/dictData/delete/${ids}`),
  updateDictDataStatus: data => request.post(`/dataCenter/dictData/updateStatus/${data.id}`, data),
}
